
#include <AT89X52.h>

void  Port0_we()
{
P1=0x0;
}

void Port0_0_Open()
{
P0=0x3F;
}

void Port0_1_Open()
{
P0=0x06;
}

void Port0_2_Open()
{
P0=0x5B;
}

void Port0_3_Open()
{
P0=0x4F;
}

void Port0_4_Open()
{
P0=0x66;
}

void Port0_5_Open()
{
P0=0x6D;
}

void Port0_6_Open()
{
P0=0x7D;
}

void Port0_7_Open()
{
P0=0x07;
}

void Port0_8_Open()
{
P0=0x7F;
}

void Port0_9_Open()
{
P0=0x6F;
}

void Port0_A_Open()
{
P0=0x77;
}

void Port0_B_Open()
{
P0=0x7C;
}

void Port0_C_Open()
{
P0=0x39;
}

void Port0_D_Open()
{
P0=0x5E;
}

void Port0_E_Open()
{
P0=0x79;
}

void Port0_F_Open()
{
P0=0x71;
}

void Delay()
{
unsigned int a;
for(a=65535;a>0;a--)
{

}
}

void main()
{


Port0_we();

Port0_0_Open();
Delay();
Delay();
Port0_1_Open();
Delay();
Delay();
Port0_2_Open();
Delay();
Delay(); 
Port0_3_Open();
Delay();
Delay();
Port0_4_Open();
Delay();
Delay();
Port0_5_Open();
Delay();
Delay();
Port0_6_Open();
Delay();
 Delay();
Port0_7_Open();
Delay();
Delay();
Port0_8_Open();
Delay();
Delay();
Port0_9_Open();
Delay();
Delay();
Port0_A_Open();
Delay();
 Delay();
Port0_B_Open();
Delay();
Delay();
Port0_C_Open();
Delay();
Delay();
Port0_D_Open();
Delay();
Delay();
Port0_E_Open();
Delay();
 Delay();
Port0_F_Open();
Delay();
Delay();
}

